<!--胡晨倩  -->
<%@page import="com.xz.group12306.domain.Cart"%>
<%@page import="java.util.List"%>
<%@page import="com.xz.group12306.business.service.impl.UserServiceImpl"%>
<%@page import="com.xz.group12306.business.service.UserService"%>
<%@page import="com.xz.group12306.domain.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript"
	src="../js/util/easyui/jquery.easyui.min.js"></script>
<title>Insert title here</title>
</head>
<body>

<div>
<form action="../ShowOrderServlet" method="post">

<table>

 <tr>
 
 <td>
    每页显示
                <select name="pagesize" id="pagesize">
                  <option value="1"  >1</option>
                    <option value="2"  >2</option>
                    <option value="3" >3</option>
                    <option value="4" >4</option>
                  </select>
                                        条信息&nbsp;&nbsp;&nbsp;
                                        
                                        第 <select name="starts" id="starts">
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3" >3</option>
                    <option value="4" >4</option>
                    <option value="5" >5</option>
                  </select>
                  页
                  </td>
                  
                  <td><input type="submit" ></td>
 
 
 </tr>
</table>
</form>
</div>


<div>
<table id="t1" class="easyui-datagrid" title="Basic DataGrid"
		style="width: 700px; height: 250px"
		data-options="singleSelect:true,collapsible:true,url:'datagrid_data1.json',method:'get'">

		<thead>
			<tr>
				<th data-options="field:'id',width:80">订单ID</th>
				<th data-options="field:'TicketID',width:80">车票ID</th>
				<th data-options="field:'userid',width:80">用户ID</th>
				<th data-options="field:'despature',width:80">出发地</th>
				<th data-options="field:'destinction',width:80">目的地</th>
				<th data-options="field:'Trainno',width:80">车次</th>
				<th data-options="field:'starttime',width:80">出发时间</th>
					<th data-options="field:'costtime',width:80">花费时间</th>
				
			</tr>


		</thead>
	 
		<%-- <%
		 Object user=session.getAttribute("user"); 
	     User ouser=(User)user;
	    
		
		int pageSize=Integer.parseInt(""+request.getParameter("pagesize"));
		int start=Integer.parseInt(request.getParameter("starts"));
		UserService userService=new UserServiceImpl();
	    List<Cart> carts=	userService.findCartByUser(ouser, start, pageSize);
		%> --%>
		<tbody>
		<c:forEach items="${carts }" var="cart">
			<tr>
				<td>${cart.id }</td>
				<td>${cart.userid }</td>
				<td>${cart.ticketid }</td>
				<td>${cart.depature}</td>
				<td>${cart.destinction}</td>
				<td>${cart.trainNo}</td>
				<td>${cart.startTime}</td>
			    <td>${cart.costTime}</td>
					
				
			

			</tr>
			</c:forEach>
		</tbody>
		



	</table>
</div>

</body>
</html>